<!-- 猜你喜欢 -->
<template>
	<view class="guessYouLike">
		<view class="LORtop">
			<view class="LORtapl">
				猜你喜欢
			</view>
		</view>
		<view class="hotBook">
			<view v-for="(book , index) in bookList.book" :key="index" class="hotBookf">
				<view class="hotBookfi">
					<img :src="book.imgUrl" alt="">
				</view>
				<view class="hotBookl">
					<view class="hotBookfn">
						{{ book.name }}
					</view>
					<view class="hotBookfcon">
						{{ book.content }}
					</view>
					<view class="hotBookfclift">
						{{ book.classift }}
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	import books from '@/assets/json/book/books.json'
	export default {
		data() {
			return {
				bookList: books,
			}
		},
		onLoad() {
			console.log(books)
		},
		methods: {
			
		}
	}
</script>

<style lang="less">
	.guessYouLike{
		background-color: #ffffff;
		box-sizing: border-box;
		padding: 4vw;
		margin-top: 4vw;
		border-radius: 10px;
	}
	.LORtop{
		display: flex;
		justify-content: space-between;
		align-items: center;
		.LORtapl{
			font-size: 5vw;
			font-weight: bold;
			color: #000000;
		}
		.LORtapr{
			font-size: 4vw;
			color: #000000;
			position: relative;
			margin-right: 2vw;
		}
		.LORtapr::after{
			content: ' ';
			width: 5px;
			height: 5px;
			border-top: 2px #000000 solid;
			border-right: 2px #000000 solid;
			position: absolute;
			right: -2vw;
			top: 2vw;
			transform:rotate(45deg);
			
		}
	}
	
	.hotBook{
		width: 84vw;
		margin-top: 2vw;
		.hotBookf{
			display: flex;
			justify-content: space-between;
			align-items: flex-end;
			margin-top: 3vw;
			.hotBookfi{
				width: 18vw;
				height: 25.2vw;
				margin-right: 3vw;
				img {
					width: 18vw;
					height: 25.2vw;
				}
			}
			.hotBookl{
				display: flex;
				justify-content: space-between;
				flex-direction: column;
				height: 25.2vw;
				.hotBookfn{
					font-size: 3.5vw;
					color: #000000;
					width: 63vw;
					overflow: hidden;
					text-overflow:ellipsis;
					white-space: nowrap;
				}
				.hotBookfcon{
					width: 63vw;
					font-size: 3vw;
					color: #aaa;
					overflow: hidden;
					text-overflow: ellipsis; 
					display:-webkit-box; 
					-webkit-box-orient:vertical; 
					-webkit-line-clamp: 2;  
				}
				.hotBookfclift{
					width: 63vw;
					font-size: 3vw;
					color: #ccc;
					overflow: hidden;
					text-overflow:ellipsis;
					white-space: nowrap;
				}
			}
			
		}
	}
	
	
</style>
